#ifndef FORCEELEMENT_H_INCLUDED
#define FORCEELEMENT_H_INCLUDED

#include "ConfigElement.h"

#define FORCE_TAG               "force"

#define FORCE_NAME_ATTRIBUTE        "name"

#define FORCE_PARAMETER_ELEMENT     "parameter"
#define FORCE_PARAM_NAME_ATTRIBUTE  "name"
#define FORCE_PARAM_VALUE_ATTRIBUTE "value"


namespace OpenNano
{
    typedef std::map<std::string, std::string> ForceParametersMap;


    class OPENNANO_EXPORT ForceElement : public ConfigElement
    {
        DECLARE_OBJECT_FACTORY( ForceElement );

        private:
            ForceParametersMap _parameters;
            std::string _name;

            bool _everything_is_good_so_far;

        protected:
            void attributeFound(TiXmlAttribute * attribute );
            void childElementFound( TiXmlElement * childElement );
            void textFound(const char * text);
            bool postConfiguration();
            void init();

        public:
            const std::string& getName() const;
            const ForceParametersMap& getParameters() const;
            bool getParameter(const std::string & name, std::string &value);
    };

}

#endif // FORCEELEMENT_H_INCLUDED
